package com.learn.practice.service;

import cn.hutool.core.date.DateTime;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class CacheServiceImpl implements CacheService {
    @Cacheable("calc")
    @Override
    public int multiply(int a, int b) {
        System.out.println("=========== CalcService 被调用了" + DateTime.now());
        int c = a * b;
        return c;
    }
}
